package lew.bing.exp.java10;

import java.util.Arrays;
import java.util.Spliterator;
import java.util.function.Consumer;
import java.util.stream.StreamSupport;

/**
 * Created by 刘国兵 on 2018/8/13.
 */
public class TestStreamSupport {

    public static void main(String[] args) {
        // 使用的是forkJoin
        StreamSupport.stream(Arrays.spliterator(new String[]{"a","b","c","d"}), true)
                .forEach((c) -> {
                    System.out.println(Thread.currentThread().getName()+c);
                });
    }

}
